package me.mayt.wxfl;

import com.jd.open.api.sdk.DefaultJdClient;
import com.jd.open.api.sdk.JdClient;
import com.jd.open.api.sdk.JdException;
import com.jd.open.api.sdk.request.cps.ServicePromotionGetcodeRequest;
import com.jd.open.api.sdk.response.cps.ServicePromotionGetcodeResponse;

import me.mayt.wxfl.util.JdProperty;

public class JDT {

	private static final String SERVER_URL = JdProperty.getServerUrl();
	private static final String APP_KEY = JdProperty.getAppKey();
	private static final String APP_SECRET = JdProperty.getAppSecret();

	void test() throws JdException {
		String accessToken = "";
		JdClient client = new DefaultJdClient(SERVER_URL, accessToken, APP_KEY, APP_SECRET);

		ServicePromotionGetcodeRequest request = new ServicePromotionGetcodeRequest();

		request.setPromotionType(123);
		request.setMaterialId("jingdong");
		request.setUnionId(123L);
		request.setSubUnionId("jingdong");
		request.setSiteSize("jingdong");
		request.setSiteId("jingdong");
		request.setChannel("jingdong");
		request.setWebId("jingdong");
		request.setExtendId("jingdong");
		request.setExt1("jingdong");
		request.setAdttype("jingdong");
		request.setProtocol(123);
		request.setPid("jingdong");

		ServicePromotionGetcodeResponse response = client.execute(request);
	}

}
